package datatype;

public class User {

	private String first_name = null;
	private String last_name = null;
	// privil == 0 is admin, privil == 1 regular player
	private int privil = 0;
	private String password = null;
	private String userName = null;
	// the id of the user in the DB
	private int id = 0;
	private int bestLong = 0;
	private int bestLevel = 0;
	private int rank = 0;
	

	public User(String first_name, String last_name, int privil,
			String password, String userName, int id, int bestLong, int bestLevel, int rank) {
		super();
		this.first_name = first_name;
		this.last_name = last_name;
		this.privil = privil;
		this.password = password;
		this.userName = userName;
		this.id = id;
		this.bestLong = bestLong;
		this.bestLevel = bestLevel;
		this.rank = rank;
	}
	
	public User(String first_name, String last_name, int privil,
			String password, String userName, int id) {
		super();
		this.first_name = first_name;
		this.last_name = last_name;
		this.privil = privil;
		this.password = password;
		this.userName = userName;
		this.id = id;

	}

	public String getFirst_name() {
		return first_name;
	}

	public void setFirst_name(String first_name) {
		this.first_name = first_name;
	}

	public String getFullName() {
		return getFirst_name() + " " + getLast_name();
	}

	public String getLast_name() {
		return last_name;
	}

	public void setLast_name(String last_name) {
		this.last_name = last_name;
	}

	public int getPrivil() {
		return privil;
	}

	public void setPrivil(int privil) {
		this.privil = privil;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getBestLong() {
		return bestLong;
	}

	public void setBestLong(int bestLong) {
		this.bestLong = bestLong;
	}

	public int getBestLevel() {
		return bestLevel;
	}

	public void setBestLevel(int bestLevel) {
		this.bestLevel = bestLevel;
	}

	public int getRank() {
		return rank;
	}

	public void setRank(int rank) {
		this.rank = rank;
	}

	@Override
	public String toString() {
		return "User [first_name=" + first_name + ", last_name=" + last_name
				+ ", password=" + password + ", userName=" + userName + ", id="
				+ id + "]";
	}

}
